package com.itheima.chapter03.characterstring;
/*
    切割字符串
 */

import java.util.Scanner;

public class domestring8 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入学生信息：");
        String stuInfo = sc.nextLine();
        String[] sarr=stuInfo.split(",");
        domestring8test stu =new domestring8test(sarr[0],sarr[1]);
        System.out.println(stu.getName()+"---"+stu.getAge());
    }
}
